const {defineConfig} = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: false,
  // 关闭eslint检查
  lintOnSave: false,
  // 配置系统项目别名-便于代码的实现
  configureWebpack: {
    resolve: {
      alias: {
        'api': '@/api',                   // api请求
        'assets': '@/assets',             // 资源
        'components': '@/components',     // 组件
        'views': '@/views',               // 界面
      }
    }
  }
})

let proxyObj = {}
proxyObj['/ws'] = {
  ws: true,
  target: 'ws://localhost:8080'
};
proxyObj['/'] = {
//websocket
  ws: false,
//目标地址
  target: 'http://localhost:8080',
//发送请求头中host会设置成target
  changeOrigin: true,
//不重写请求地址
  pathRewrite: {
    '^/': '/'
  }
}
